﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Physis.Security {

    public class Permission : Core.CoreObject {
        
        #region Constructors

        public Permission (Application forApplication) : base (forApplication) {

            return;

        }

        public Permission (Application forApplication, Int64 forId) : base (forApplication) {

            if (!Load (forId, Application.EnterpriseDatabase)) {

                throw new Exception (GetType ().FullName + ".Load [Failed]: " + forId);

            }

            return;

        }

        public Permission (Application forApplication, String forName) : base (forApplication) {

            if (!Load (forName, Application.EnterpriseDatabase)) {

                throw new Exception (GetType ().FullName + ".Load [Failed]: " + forName);

            }

            return;

        }

        #endregion

    }

}
